.post {
  margin-bottom: 40px;
  overflow: hidden;

  &.with-blocks {
    border: 1px solid #efefef;
    padding: 10px;
    @include border-radius(3px);

    &.preview .box {
      margin-left: 10px;
    }

    .member-actions {
      font-size: 15px;
      float: right;
    }

    .entry {
      float: left;
      width: 390px;
    }

    .side {
      float: left;
      clear: right;
      .box {
        width: 269px;
        margin-top: 0;
      }
      ul {
        padding-left: 10px;
        li {
          list-style: none;
          margin-bottom: 5px;
          border-bottom: 1px dashed #CCCCCC;

          a {
            &:hover {
              text-decoration: underline;
              color: #000000;
            }
          }
        }
      }
    }

    &:hover { @include box-shadow; }
  }

  .title {
    letter-spacing: -2px;
    padding: 7px 0 0;
    border-bottom: 1px solid #CCCCCC;

    a {
      border: medium none;
      color: #262626;
      &.red { color: red; }
    }
  }

  .meta {
    font-family: Arial,Helvetica,sans-serif;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 30px;
    padding: 0;
    text-align: left;

    .date {
      float: left;
    }
    .posted {
      float: right;
    }
  }

  // TODO position: absolute; padding-left?
  .img {
    float: left;
    margin-right: 10px;
    width: 128px;
    img { max-width: 128px; }
  }

  .entry, .body {
    padding: 0 10px;
    text-align: justify;
    line-height: 1.5;
  }

  &.preview .box {
    margin-left: 138px;
  }
}

.form {
  div {
    margin: 10px;

    input:not([type="submit"]) {
      display: block;
    }

    input[type="checkbox"] { display: inline; }
    /*label { color: #000000; font-weight: bold; }*/

    &.actions { margin-top: 10px; }
    &.links {  }

    &.left {
      width: 30%;
      float: left;
      text-align: right;

      label {
        display: block;
        margin-top: 5px;
      }
    }

    &.right {
      width: 60%;
      float: left;
      clear: right;
    }
  }

  &.editor {
    .left { width: 15%; }
    .right {
      width: 80%;
    }
  }
}

#tags_fields {
  width: 300px;
  margin: 0px;

  .tag-fields {
    /*clear: both;*/
    margin-left: 0;

    input, a {
      float: left;
    }
  }

  a#new_tag_field {
    display: block;
    background: image-url("icons/plus.png") no-repeat;
    height: 32px;
    width: 32px;
    float: left;
  }

  // TODO refactor

  a.delete {
    display: block;
    background: image-url("icons/minus.png") no-repeat;
    height: 32px;
    width: 32px;
  }
}

// TODO
a.delete {
  display: block;
  background: image-url("icons/minus.png") no-repeat;
  height: 32px;
  width: 32px;
}

.intro {
  background: image-url("eco-sfera.jpg") no-repeat;
  font-weight: bold;

  .box {
    &.about {
      margin: 0 40px;
      text-align: justify;
      color: #000000; //#274775

      h2 {
        text-align: center;
        color: #616161;
      }
      
      p {
        padding: 5px;
        background: #FFFFFF;
        @include border-radius;
        @include opacity(80);
      }
    }

    &.split {
      width: 45%;
      float: left;
      border-left: 1px solid #CCCCCC;
      border-top: 1px solid #CCCCCC;

      /*&.news { background: image-url("news.png") no-repeat top right; }*/
      /*&.publications { background: image-url("atom.png") no-repeat top right }*/
      /*&.articles { background: image-url("unknown.png") no-repeat top right }*/
      
      ul {
        li {
          list-style: none;
          margin-bottom: 5px;
          border-bottom: 1px solid #CCCCCC;
          
          a {
            &:hover {
              text-decoration: underline;
              color: #000000;
            }
          }
        }
      }

      .extra {
        text-align: right;
        
        a {
          color: #CCCCCC;
          text-decoration: underline;

          &:hover {
            color: #000000;
          }
        }
      }
    }
  }
}

.ajax-loader {
  display: block;
  .loader-image {
    display: none;
    height: 32px;
    width: 32px;
    background: image-url('ajax-loader.gif') 0 0 no-repeat;
  }
}

.box {
  position: relative;
  margin: 10px !important;
  padding: 10px !important;
  @include border-radius(3px);
  h2 {
    border-bottom: 1px solid #ccc;
    margin-right: 7px;
    margin-bottom: 10px;
    padding: 5px
  }
  &.light-gray {
    border: 1px solid #DDDDDD;
    background-color: #F9F9F9;
  }
}

.info-panel {
  position: relative;
  min-height: 65px;
  .author { float: left; }
  .additional {
    margin-left: 5px;
    padding-top: 7px;
    height: 65px;
    text-align: left;
    float: left;
    .name, .date {
      font-weight: bold;
      padding: 5px;
    }
    .name a {
      text-decoration: none;
      color: #5f9ea0;
      &:hover { color: #ff4500; }
    }
  }
}

.rating {
  display: block;
  position: absolute;
  float: right;
  width: 150px;
  right: 0px;
  bottom: 0px;
  height: 30px;
  padding: 5px 2px 0 0;
  border-left: 1px solid #DDDDDD;
  border-top: 1px solid #DDDDDD;
  @include border-radius(3px 0 0 0);

  span {
    display: block;
    float: left;
    padding: 5px;
    /*height: 24px;*/
    font-weight: bold;
    font-style: normal !important;
    &.green { color: green; }
    &.red { color: red; }
  }
  a {
    display: block;
    float: right;
    width: 24px;
    height: 24px;
    background-image: image-url("icons/marks.png");
    &.good-mark { }
    &.bad-mark {
      background-position: 0 24px;
    }
  }
}

.tags, .chars {
  a {
    display: inline-block;
    margin: 3px;
    padding: 5px 10px;
    border: 1px solid #D5D5D5;
    @include border-radius(4px);
    font-size: $basefont;
    line-height: normal;
    background-color: #F9F9F9;
    color: #4A7FB3;
    text-decoration: none;
    &:hover {
      color: orange;
    }
  }
}

.chars a {
  &.selected {
    background: #87ceeb;
    color: #ffffff;
    font-weight: bold;
  }
}

dl.terms {
  dd {
    clear: both;
    margin: 10px 30px 20px;
    font-size: 15px;
    font-style: italic;
    text-align: justify;
  }
}

.comments {
  margin-top: 40px;

  .box.meta {
    h2 { padding-left: 110px; }
    img {
      position: absolute;
      top: -30px;
      left: -15px;
      z-index: 1;
    }
  }

  .comment {
    position: relative;
    min-height: 65px;
    .avatar { position: absolute; }
    .meta {
      margin-left: 75px;
      line-height: 1.5em;
    }
    .text { margin-left: 75px; }
    .delete {
      display: block;
      position: absolute;
      right: 5px;
      top: 5px;
      width: 24px;
      height: 24px;
    }
  }

  #comment_form {
    input[type="submit"] {
      margin: 10px;
    }
  }

  .ajax-loader {
    float: right;
  }
}

.filter {
  .ajax-loader {
    position: absolute;
    top: 0px;
    right: 0px;
  }

  input, select {
    width: 100%;
  }

  .block {
    float: left;
    /*width: 20%;*/
    margin: 5px;

    input[type="text"], select {
      width: 150px;
    }
  }

  &.small {
    input[type="text"] { width: 95%; }
  }
}

table {
  width: 100%;
  margin-bottom: 18px;
  padding: 0;
  font-size: 13px;
  border-collapse: collapse;
  td, th {
    padding: 10px 10px 9px;
    line-height: 18px;
    text-align: left;
  }
  th {
    padding-top: 9px;
    font-weight: bold;
    vertical-align: middle;
  }
  td {
    vertical-align: top;
    border-top: 1px solid #ddd;
  }
}

.separator {
  margin: 7px auto;
  clear: both;
  width: 40px;
  border-top: 1px solid #CCCCCC;
}

.content-center { text-align: center !important; }
.content-left { text-align: left !important; }
.content-right { text-align: right !important; }